<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>用户登录</title>
  <style type="text/css">
    .errorlist {
      color: #f00;
    }
  </style>
</head>
<body>
  <h3>用户登录</h3>
  <form action="." method="post">
    {% csrf_token %}
{#    {{ form.as_p }}#}
    <div>
      <!-- 用户名 -->
      {{ form.username.label }}
      {{ form.username }}
      {{ form.username.errors.as_text }}
    </div>
    <div>
      <!-- 密码 -->
      {{ form.password.label }}
      {{ form.password }}
      {{ form.password.errors.as_text }}
    </div>
    <div>
      {{ form.non_field_errors.as_text }}
    </div>
    <input type="submit" value="登录">
  </form>
</body>
</html>
